package com.mango.leet.code.hard;

import java.util.Arrays;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Queue;

/**
 * https://leetcode.cn/problems/find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows/
 * @Author: mango
 * @Date: 2023/5/28 15:00
 */
public class LC1439 {
    public static void main(String[] args) {
        int[][] mat = {
            {1,3,11},
            {2,4,6},
            {3,5,7}
        };
        int k = 5;
        System.out.println(kthSmallest(mat,k));
    }
    public static int kthSmallest(int[][] mat, int k) {
        // 使用优先级队列
        Queue<Integer> queue = new PriorityQueue<>();
        int i = 0;
        int j = 0;
        int lx = mat.length;
        int ly = mat[0].length;
        int base = mat[0][0];
        // 0,0 + 1,0 + 2,0
        // 0,0 + 1,0 + 2,1
        for(int y=0;y<ly;y++){
            int sum = 0;
            for(int x=0;x<lx;x++){
                System.out.println(x+","+y);
                sum += mat[x][y];
            }
            System.out.println("------");
        }
        return 1;
    }
}
